<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>

<form action="?" method="post" id="dform">
    <input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
    <input type="hidden" name="file" value="<?php echo $file;?>"/>
    <input type="hidden" name="action" value="<?php echo $action;?>"/>
    <input type="hidden" name="id" value="<?php echo $id;?>"/>
    <input type="hidden" name="forward" value="<?php echo $forward;?>"/>
    <div class="tt"><?php echo $tname;?></div>
    <table cellpadding="2" cellspacing="1" class="tb">

      <tr>
            <td class="tl"><span class="f_red">*</span> <?php echo $MOD['name'];?>名称</td>
	        <td><input name="post[name]" type="text" id="name" size="60" datatype="*2-999" nullmsg="请填写名称" errormsg="最少输入2个字符" value="<?php echo $name;?>"/></td>
        </tr>

     	<tr>
        <td class="tl"><span class="f_hid">*</span> 开始时间</td>
	        <td><input name="post[starttime]" type="text" size="40" value="<?php echo $starttime;?>"/></td>
        </tr>
     	<tr>
        <td class="tl"><span class="f_hid">*</span> 结束时间</td>
	        <td><input name="post[overtime]" type="text" size="40" value="<?php echo $overtime;?>"/></td>
        </tr>
        <tr>
        <td class="tl"><span class="f_hid">*</span> 难度系数</td>
	        <td><input name="post[difficulty]" type="text" size="40" value="<?php echo $difficulty;?>"/></td>
        </tr>
        <tr>
        <td class="tl"><span class="f_hid">*</span> 优先等级</td>
	        <td><input name="post[priority]" type="text" size="40" value="<?php echo $priority;?>"/></td>
        </tr>
        <tr>
        <td class="tl"><span class="f_hid">*</span> 奖励钱数</td>
	        <td><input name="post[moneyadd]" type="text" size="40" value="<?php echo $moneyadd;?>"/></td>
        </tr>
        <tr>
        <td class="tl"><span class="f_hid">*</span> 奖项数量</td>
	        <td><?php if ($used)echo $used;?><?php if (!$used) echo '0';?>/<input name="post[mount]" type="text" size="4" value="<?php echo $mount;?>"/></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_hid">*</span> <?php echo $MOD['name'];?>状态</td>
            <td>
                <input type="radio" name="post[status]" value="3" <?php if ($status == 3) echo 'checked';?> id="status_3"/><label for="status_3"> 通过</label>
                <input type="radio" name="post[status]" value="0" <?php if ($status == 0) echo 'checked';?> id="status_0"/><label for="status_0"> 删除</label>
            </td>
        </tr>
        <tbody id="basic" style="display:<?php echo $islink ? 'none' : '';?>;">
        <tr>
        <td class="tl"><span class="f_red">*</span> <?php echo $MOD['name'];?>备注</td>
	        <td><?php echo Post::kindEditor('post[note]', $moduleid, $note, 'datatype="*5-99999"','800px'); ?></td>
        </tr>
	    </tbody>
    </table>
    <div class="sbt"><input type="submit" name="submit" value=" 确 定 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value=" 重 置 " class="btn"/></div>
</form>
<script type="text/javascript">
	seajs.use(['$', 'vf', 'vf-css', 'easyui','easyui-css'], function($){
		$('#dform').Validform({
			beforeCheck:function(curform){
				lemon.editor.post_content_.sync();
			}
		});

	});
	function TopUse(a) {
		mkDialog('', '<iframe src="?moduleid=<?php echo $moduleid;?>&action='+a+'" width="650" height=250" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" scrolling="yes"></iframe>', '请选择', 675, 0, 0);
	}
</script>
<script type="text/javascript">Menuon(<?php echo $menuid;?>);</script>
<?php include tpl('footer'); ?>